#
<init>
subevent(mapinit,);
zukan(warppos:*all,|=,tower);

#item(check:eq,},1); if(nowres);
#mc(72,eneg,+=,(nȁ~U(20),TLf~U(20),nȁTLfR(20)));
#mc(77,eneg,+=,(nȁ~S(20),TLf~S(20),nȁTLfQ(20)));
#item(check:eq,Xg,1); and; item(check:eq,e̊O,1); if(nowres);
#mc(72,eneg,+=,(F~R(60),F~U(60)));
#mc(77,eneg,+=,(F(60),F~Q(60)));
#endif;
#endif;

subevent(yj5adbl,); if(nowres);
mc(72,enegr,+=,(`T~S(20),nȁ`TQ(20),TLf`TQ(20),cs`TQ(20)));
mc(77,enegr,+=,(`T~R));
endif;


#O
<out>
fade(out,(type=fade,color=000000,wait=16)); fc(*actor,move,23,18,center); fc(*actor,dir,=,d); changemap(tB[h); fade(in,(type=fade,color=000000,wait=16));


#Oցij
<out2>
sound(drop); fade(out,(type=fade,color=00ffff,wait=16)); fc(*actor,move,23,18,center); fc(*actor,dir,=,d); fc(*actor,float,=,128); changemap(tB[h); fade(in,(type=fade,color=000000,wait=16));


#Ki㏸
<up>
fc(*actor,walk,0,8,0,-2,u); return;


#Ki~
<down>
fc(*actor,walk,0,8,0,2,d); return;


#C}jA
<box_shumanu>
#fc(c2,apr,==,0); and; fc(c3,apr,==,0); and; fc(c4,apr,==,0); and; fc(c5,apr,==,0); if(nowres);
#evflag(instant1,=,id(item:GNT[));
#evflag(instant1,=,id(item:]));
#subevent(box_item,);
#endif;

fc(c2,apr,==,0); and; fc(c3,apr,==,0); if(nowres);
fc(c4,apr,==,0); and; fc(c5,apr,==,0); if(nowres);
subevent(box_item(id(item:GNT[)),);
evflag(instant1,=,0); evflagsw(pr_towelix,=,1);
else;
subevent(box_item(id(item:񕜂̏)),);
endif;
else;
subevent(box_item(id(item:񕜖)),);
endif;

#oGω
#fc(*target,apr,==,0); if(nowres);
#mc(17,enegref,=,16);
#sound(boon); fade(out,(type=fade,color=000000,wait=32)); fade(in,(type=fade,color=000000,wait=32));
##text(0,ӂ̓G̋CzƂ܂I);
#text(1,face=uam,ӂ̓G̋CzƂ܂I\nȋ̕ω͖悤j);
#endif;


#qg
<brd_tower>
text(1,face=+evfch,^񒆂ŌɂׂB);
zukan(item:񕜂̏,==,1); if(nowres); text(1,face=uam,w%it[*񕜂̏].nmicx肷邽߂̃qg悤B); endif;